package com.are.odisea;

import java.sql.ResultSet;
import java.sql.SQLException;

public class HtmlRoles {
public HtmlRoles() {
		
	}

public String LlenarLista(){
	String str = "";
	ManejadorRoles gc=null;   	
	db conexion = null;
	try {
		conexion = new db();
		gc = new ManejadorRoles(conexion);
		ResultSet rs=gc.GetRoles();
		while (rs.next()){
			str+="<input type=\"checkbox\" name=\"list_rol\" value=\""+rs.getString(1)+"\">"+rs.getString(2);
		}
	} catch (SQLException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}finally {
		if (conexion != null){
			try {
				conexion.Close();
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				//out.print("NO se conecto a la base de datps");
				e.printStackTrace();
			}
		}
		
	}
	return str;
}
}
